// blog接口模块
const router = require('koa-router')();
const { getBlog, delBlog, editBlog, addBlog } = require('../controller/blog')
// 获取博客
router.get('/blog/list', getBlog) // 业务逻辑抽离  
// 删除博客
router.delete('/blog/list/:id', delBlog)
// 编辑博客
router.put('/blog/list', editBlog)
// 添加博客
router.post('/blog/list', addBlog)


module.exports = router;